package com.bci.pwtz.service.cad;

public class Cad_Point
{
  public double x = 0.0D;
  public double y = 0.0D;

  public Cad_Point()
  {
    clear();
  }

  public Cad_Point(Cad_Point paramEx_dpoint)
  {
    copy(paramEx_dpoint);
  }
  
  public Cad_Point(double db1, double db2){
	  set(db1, db2);
  }

  public static boolean double_equals(double db1, double db2)
  {
    return Math.abs(db1 - db2) < 1.E-009D;
  }

  public void clear()
  {
    this.y = 0.0D;
    this.x = 0.0D;
  }

  public void copy(double db1, double db2)
  {
    this.x = db1;
    this.y = db2;
  }

  public void copy(Cad_Point paramEx_dpoint)
  {
    this.x = paramEx_dpoint.x;
    this.y = paramEx_dpoint.y;
  }

  public boolean equals(Object paramObject)
  {
    if (paramObject == null)
    	return false;
    
    Cad_Point point;
    if (paramObject instanceof Cad_Point) {
    	point = (Cad_Point)paramObject;
    	if (double_equals(point.x, this.x) && double_equals(point.y, this.y)) {
    		return true;
    	}
    }
    return false;
//    
//    do
//    {
//      do
//        return false;
//      while (!(paramObject instanceof Ex_dpoint));
//      point = (Ex_dpoint)paramObject;
//    }
//    while ((!double_equals(point.x, this.x)) || (!double_equals(point.y, this.y)));
//    return true;
  }

  public void set(double db1, double db2)
  {
    this.x = db1;
    this.y = db2;
  }

  public void set(Cad_Size paramEx_dsize)
  {
    this.x = paramEx_dsize.cx;
    this.y = paramEx_dsize.cy;
  }
}
